home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / dalla rivista / netconnect3 / amirc_33 / rexx / sendbrowser.amirx < prev    next >
Text File  |  1998-01-13  |  3KB  |  87 lines

  1. /* $VER: sendbrowser.amirx 2.2 (13 Jan 1998)                              */
  2. /**************************************************************************/
  3. /* Script to give the URL of the URL-Grabber of AmIRC to your WWW-Browser.*/
  4. /* Currently supported are IBrowse, AWeb and AMosaic                      */
  5. /* (Voyager-NG only for compleetnes, in case this script is used from     */
  6. /* another program, AmIRC does not need it)                               */
  7. /**************************************************************************/
  8. /* Author  : Markus 'lammy' Lamers; E-Mail: markus.lamers@tu-clausthal.de */
  9. /*           thanx to Peter "Stoebi" Schulz and Dominic "D0M" Wäsch for   */
  10. /*           their help                                                   */
  11. /**************************************************************************/
  12. /* In case your Browser isn't already running, this script will start it. */
  13. /* For this its necessary to specify the path to your default Browser ... */
  14. /* Example: BROWSER = "AmiTCP:Voyager/V"                                  */
  15. BROWSER = ""
  16. /**************************************************************************/
  17.  
  18. parse arg args
  19. options results
  20.  
  21. ShowURL:
  22.   /* IBrowse */
  23.   if show('P','IBROWSE') then do
  24.           address 'IBROWSE'
  25.           SHOW
  26.           GOTOURL args
  27.           Exit
  28.   end
  29.  
  30.   /* AWeb */
  31.   if show('P','AWEB.1') then do
  32.           address 'AWEB.1'
  33.           OPEN args
  34.           Exit
  35.   end
  36.  
  37.   /* AMosaic (is it still needed ?!) */
  38.   if show('P','AMOSAIC.1') then do 
  39.           address 'AMOSAIC.1'
  40.           SHOW
  41.           JUMP URL args
  42.           Exit
  43.   end
  44.  
  45.   /* Voyager */
  46.   if show('P','VOYAGER') then do
  47.           address 'VOYAGER'
  48.           SHOW
  49.           OPENURL args
  50.           Exit
  51.   end
  52.  
  53.   /* Voyager (DEBUG) */
  54.   if show('P','VOYAGER.1') then do
  55.           address 'VOYAGER.1'
  56.           SHOW
  57.           OPENURL args
  58.           Exit
  59.   end
  60.  
  61. DefaultBrowser:
  62.   address AmIRC.1
  63.   if (BROWSER ~= "") & (exists(BROWSER)) then do
  64.     'echo found no running browser, will start default browser now ...'
  65.     address command 'Run ' BROWSER args
  66.   end
  67.   else do
  68.     if exists('env:vapor/Voyager_LASTUSEDDIR') then do
  69.       'echo starting Voyager ...'
  70.       call open(aw,'env:vapor/Voyager_LASTUSEDDIR','r')
  71.       browser=readln(aw)
  72.       call close(aw)
  73.       Voyager=browser'/V'
  74.       address command 'run ' '"'Voyager'"' args
  75.     end
  76.     else do
  77.       address AmIRC.1
  78.       'echo You must start your WWW-Browser first, or better specify your default browser in sendbrowser.amirx'
  79.       exit
  80.     end
  81.   end
  82.   EXIT
  83.  
  84.  
  85. EXIT 10
  86.  
  87.